package com.gxa.admin.controller;

import com.gxa.admin.param.UserParam;
import com.gxa.admin.service.UserService;
import com.gxa.o2o.core.dto.ResultDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/user")
@Api(tags = "后台----用户管理")
public class UserController {
    @Autowired
    UserService userService;

    @PostMapping("/findById")
    @ApiOperation(value = "通过id查询")
    public ResultDTO findById(String id){
        return userService.findById(id);
    }

    @PostMapping("/listByParam")
    @ApiOperation(value = "通过条件分页查询")
    public ResultDTO listByParam(UserParam param){
        return userService.listByParam(param);
    }




}
